package com.org.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.org.bean.AdminInfoBean;
import com.org.bean.UsermessageBean;
import com.org.service.ILoginService;
import com.org.service.IUserService;

@Controller
public class UserAction {

	// 依赖注入【反转控制】
	// 面向接口的编程
	@Resource
	private IUserService userS;// 按名称匹配进行注入

	@ResponseBody
	@RequestMapping("AjaxQueryUserAction")
	public List<UsermessageBean> ajaxQueryUser(UsermessageBean userB) {
		// 调用service层进行查询操作
		List<UsermessageBean> lstAdmins = userS.queryInfoByParams(userB);
		// 直接返回查询结果集即可，springmvc框架自动将结果集转换为json字符串返回给客户端
		return lstAdmins;
	}

}
